Creating a Certificate in IIS |
|
Certificates can be created but they must be trusted by the server for authentication. This topic describes the procedure for creating a sample certificate with IP address as the Subject Alternate Name to work with Event handling.
- Install OpenSSL. For information on installing OpenSSL, refer to http://www.slproweb.com/products/Win32OpenSSL.html.
- Event service uses IP address as an alternate domain to receive events from the server. Therefore, if the application you are developing uses Event service then you must specify the subject alternative name as the machine name and the IP address. To perform this, open openssl.cfg file in the <OpenSSL installation folder>/bin folder and add the following line below [ v3_req ]:
subjectAltName=DNS: machineName,DNS: ipAddressOfMachine
subjectAltName=DNS: computer1 , DNS: 10.192.178.32
subjectAltName
with the given values. - To request for a server certificate, navigate to the <OpenSSL installation folder>/bin folder in the command prompt and type the following:
openssl req -config openssl.cfg -new -out <server certificate name>.csr -reqexts v3_req
Note: To verify whether the subject alternate name is added to the certificate request, use the below command:openssl req -in <server certificate name>.csr -config openssl.cfg -text
- To create a private key for the certificate, navigate to the <OpenSSL installation folder>/bin folder in the command prompt and type the following:
openssl rsa -in privkey.pem -out <server certificate name>.key
- To get the key in p12 format, type the below command :
openssl pkcs12 -export -in <server certificate name>.cer -inkey <server certificate name>.key -out privatekey.p12
The server certificate request is now created.